package com.iwomy.secureplat.platform.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.iwomy.secureplat.platform.dto.AlarmRulesDTO;
import com.iwomy.secureplat.platform.entity.AlarmDetectionTypeEntity;
import com.iwomy.secureplat.platform.entity.AlarmRulesEntity;
import com.iwomy.secureplat.platform.entity.BasicDeviceEntity;
import com.iwomy.secureplat.platform.entity.BasicSensorEntity;
import com.iwomy.secureplat.platform.vo.AlarmRulesVO;

import java.util.List;

public interface AlarmRulesService extends IService<AlarmRulesEntity> {

	boolean savaAlarmRules(AlarmRulesDTO alarmRulesDTO);


	boolean updateAlarmRulesById(AlarmRulesDTO alarmRulesDTO);


	AlarmRulesVO getAlarmRulesById(Long id);


	List<AlarmRulesEntity> listBySensorIds(BasicDeviceEntity device,List<String> sensorIds);

	/**
	 * 根据设备查询报警规则
	 * @param device
	 * @return
	 */
	List<AlarmRulesEntity> listByDevice(BasicDeviceEntity device);


	Page pageByScope(Page page, AlarmRulesEntity alarmRulesEntity);

	List<AlarmRulesEntity> listByScope( AlarmRulesEntity alarmRulesEntity);

}